package org.ingeniart.siec.model;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the registro_academico database table.
 * 
 */
@Embeddable
public class RegistroAcademicoPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	@Column(name="id_curso")
	private Integer idCurso;

	@Column(name="id_materia")
	private Integer idMateria;

    public RegistroAcademicoPK() {
    }
	public Integer getIdCurso() {
		return this.idCurso;
	}
	public void setIdCurso(Integer idCurso) {
		this.idCurso = idCurso;
	}
	public Integer getIdMateria() {
		return this.idMateria;
	}
	public void setIdMateria(Integer idMateria) {
		this.idMateria = idMateria;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof RegistroAcademicoPK)) {
			return false;
		}
		RegistroAcademicoPK castOther = (RegistroAcademicoPK)other;
		return 
			this.idCurso.equals(castOther.idCurso)
			&& this.idMateria.equals(castOther.idMateria);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.idCurso.hashCode();
		hash = hash * prime + this.idMateria.hashCode();
		
		return hash;
    }
}